@extends('admin/layout/index')
@section('content')
    <div class="mws-panel grid_8">
    <div class="mws-panel-header">
        <span>编辑商品</span>
    </div>
    <div class="mws-panel-body no-padding">
        <form class="mws-form" action="/admin/poster/insert" enctype='multipart/form-data' method='post'>
            {{ csrf_field() }}
            <div class="mws-form-inline">
                <div class="mws-form-row">
                    <label class="mws-form-label">更改名称</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name='title' placeholder="{{ $goods['title'] }}">
                    </div>
                </div>

                <div class="mws-form-row">
                    <label class="mws-form-label">更改型号</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name='ve_title'placeholder="{{ $goods['version'] }}">
                    </div>
                </div>

                 <div class="mws-form-row">
                    <label class="mws-form-label">修改进货价</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name='orig' placeholder="{{ $goods['orig'] }}">
                    </div>
                </div>

                <div class="mws-form-row">
                    <label class="mws-form-label">修改销售价</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name='price' placeholder="{{ $goods['price'] }}">
                    </div>
                </div>

                <div class="mws-form-row">
                    <label class="mws-form-label">上架数量</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name='num' placeholder="{{ $goods['num'] }}">
                    </div>
                </div>
               
              <div class="mws-form-row">
                    <label class="mws-form-label">选择类别</label>
                    <div class="mws-form-item">
                        <select class="large" name='pid'>
                            <option value="0">--暂无分类--</option>
                            @foreach( $class as $k => $v )
                            @if( $v['id'] != 0)
                            <option value="{{ $v['id'] }}" @if( $v['id'] == $goods['cl_id']) selected @endif >{{ $v['title'] }}</option>
                            @endif
                            @endforeach
                        </select>
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">所属品牌</label>
                    <div class="mws-form-item">
                        <select class="large" name='pid'>
                            <option value="0">--无品牌--</option>
                            @foreach( $brand as $k => $v )
                            @if( $v['id'] != 0)
                            <option value="{{ $v['id'] }}"  @if( $v['id'] == $goods['br_id']) selected @endif >{{ $v['title'] }}</option>
                            @endif
                            @endforeach
                        </select>
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">销售模式</label>
                    <div class="mws-form-item">
                        <select class="large" name='pid'>
                            <option value="0">--普通--</option>
                            @foreach( $sale as $k => $v )
                            @if( $v['id'] != 0)
                            <option value="{{ $v['id'] }}" @if( $v['id'] == $goods['sa_id']) selected @endif >{{ $v['title'] }}</option>
                            @endif
                            @endforeach
                        </select>
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">商品详细描述</label>
                    <div class="mws-form-item">
                       <textarea name="" id="" cols="90" rows="10">{{ $goods['content'] }}</textarea>
                    </div>
                </div>
            </div>
            <div class="mws-button-row">
                <input value="提交" class="btn btn-danger" type="submit">
                <input value="重置" class="btn " type="reset">
            </div>
        </form>
    </div>      
</div>
@endsection
@section('link')

    <!-- JavaScript Plugins -->
    <script src="/admin/js/libs/jquery-1.8.3.min.js"></script>
    <script src="/admin/js/libs/jquery.mousewheel.min.js"></script>
    <script src="/admin/js/libs/jquery.placeholder.min.js"></script>
    <script src="/admin/custom-plugins/fileinput.js"></script>
    
    <!-- jQuery-UI Dependent Scripts -->
    <script src="/admin/jui/js/jquery-ui-1.9.2.min.js"></script>
    <script src="/admin/jui/jquery-ui.custom.min.js"></script>
    <script src="/admin/jui/js/jquery.ui.touch-punch.js"></script>

    <!-- Plugin Scripts -->
    <script src="/admin/plugins/datatables/jquery.dataTables.min.js"></script>
    <!--[if lt IE/admin/ 9]>
    <script src="js/libs/excanvas.min.js"></script>
    <![endif]-->
    <script src="/admin/plugins/flot/jquery.flot.min.js"></script>

    <script src="/admin/plugins/flot/plugins/jquery.flot.tooltip.min.js"></script>
    <script src="/admin/plugins/flot/plugins/jquery.flot.pie.min.js"></script>
    <script src="/admin/plugins/flot/plugins/jquery.flot.stack.min.js"></script>
    <script src="/admin/plugins/flot/plugins/jquery.flot.resize.min.js"></script>
    <script src="/admin/plugins/colorpicker/colorpicker-min.js"></script>
    <script src="/admin/plugins/validate/jquery.validate-min.js"></script>
    <script src="/admin/custom-plugins/wizard/wizard.min.js"></script>

    <!-- Core Script -->
    <script src="/admin/bootstrap/js/bootstrap.min.js"></script>
    <script src="/admin/js/core/mws.js"></script>

    <!-- Themer Script (Remove if not needed) -->

    <!-- Demo Scripts (remove if not needed) -->
    <script>
        $('#moreVersion').click(function(){
            // $("p").after( $('.newVersion'));
            $('<a>sdf</a>').after($(this));
        })
    </script>
@endsection